/*
 * Package: org.grassfield.common.dao
 * FileName: SystemConfigDAOTest.java
 *  
 * Created by pandian on Jan 28, 2011
 */
package dao;

import java.util.List;

import bean.SystemConfig;

import test.BaseTest;



/**
 * The Class SystemConfigDAOTest.
 */
public class SystemConfigDAOTest extends BaseTest {
	private ISystemConfigDAO systemConfigDAO;
	

	/**
	 * Sets the system config dao.
	 * 
	 * @param systemConfigDAO
	 *            the new system config dao
	 */
	public void setSystemConfigDAO(ISystemConfigDAO systemConfigDAO) {
		this.systemConfigDAO = systemConfigDAO;
	}

	/**
	 * Test list.
	 */
	public void testList() {
		List<SystemConfig> list = this.systemConfigDAO.list();
		super.assertNotNull(list);
		super.assertTrue(!list.isEmpty());
		System.out.println("list:"+list);
	}

	/**
	 * Test get value.
	 */
	public void testGetValue() {
		SystemConfig value = this.systemConfigDAO.getValue("EXPIRY_TIMER_DURATION_DAYS");
		super.assertNotNull(value);
		System.out.println("value:"+value.getValue());
	}

}
